Personal tools

Lua/Client/Character/Functions/GetBonePosition

From JC2-MP Documentation

< Lua‎ | Client‎ | Character
Jump to: navigation, search

Returns    Vector3
Prototype    Character:GetBonePosition(string)
Description    Returns the position of the bone specified.


Example

The following draws a circle around the player's head:

  1. function RenderHeadCircle()
  2. 	local position = LocalPlayer:GetBonePosition("ragdoll_Head")
  3. 	Render:DrawCircle(position, 0.1, Color.LawnGreen)
  4. end
  5.  
  6. Events:Subscribe("Render", RenderHeadCircle)

Bones reference

Bones Reference.png
Note: All bone name strings are prefixed with "ragdoll_"

See Also